@extends('layout.template')

@section('title')
	{{ $title }}
@stop

@section('content')

<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title">Convertion Rate</h3>
	</div>
	<div class="panel-body">
		{{ Form::open(array('url' => 'admin/apis/convertion','method' => 'POST','class'=>'form-inline','role'=>'form'))}}
		{{ Form::hidden('key', $key ) }}
		{{ Form::hidden('network', $network ) }}	
		<div class="row">			
			@foreach($result as $offer)
			<div class="form-group col-xs-6" style='padding-bottom: 8px'>
				<input type="radio" name="offer" value="{{ $offer['offer_id'] }}"> {{ $offer['offer_name'] }} - {{ $offer['offer_id'] }} ;
			</div>				
			@endforeach						
		</div>
		<div class='row'>
			<div class="form-group col-xs-12" style='padding-bottom: 10px'>				
				<input type="date" name="date" value="{{$date}}" id="date" class="form-control"/>
				<link href="{{Asset('public/datepicker/css/ui-lightness/jquery-ui-1.10.4.custom.min.css')}}" rel="stylesheet">
				<script src="{{Asset('public/datepicker/js/jquery-1.10.2.js')}}"></script>
				<script src="{{Asset('public/datepicker/js/jquery-ui-1.10.4.custom.min.js')}}"></script>
				<script type="text/javascript">
					$('#date').datepicker();
				</script>
			</div>
		</div>		
		{{ Form::submit('Submit', array('class' => 'btn btn-danger btn-sm'))}}	
		{{ Form::close() }}
	</div>
</div>

<div class="panel panel-default" id='form'>
	<div class="panel-heading">
		<h3 class="panel-title">Convertion Report</h3>
	</div>
	<div class="panel-body">
		{{ Form::open(array('url' => 'admin/apis/report'))}}
		{{ Form::hidden('key', $key ) }}
		{{ Form::hidden('network', $network ) }}
		<div class='row'>
			<div class="form-group col-xs-4">
				<label for="start"><i class="icon-user"></i> <b> Start</b></label>
				<input type="date" name="data_start" value="" id="data_start" class='form-control'/>
				<script type="text/javascript">
					$('#data_start').datepicker();
				</script>				
			</div>

			<div class="form-group col-xs-4">
				<label for="end"><i class="icon-user"></i> <b> End</b></label>
				<input type="date" name="data_end" value="" id="data_end" class='form-control'/>						
				<script type="text/javascript">
					$('#data_end').datepicker();
				</script>
			</div>
		</div>		
		{{ Form::submit('Submit', array('class' => 'btn btn-primary btn-sm'))}}	
		{{ Form::close() }}
	</div>
</div>


@stop

